<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html >
<html lang="en">
<head>
<%@include file="../../common/includeBaseSet.jsp"%>
<%@include file="../../common/includeSystemSet.jsp"%>
<%@include file="../../common/operation_forbid.jsp"%>
<%@include file="../../common/jsVersion.jsp"%>
<link rel="stylesheet" type="text/css"  href="${jypath}/static/ext/resources/ext-theme-gray/ext-theme-gray-all.css" />
<script type="text/javascript" src="${jypath}/static/ext/ext-all.js"></script>
<script type="text/javascript" src="${jypath}/static/ext/locale/ext-lang-zh_CN.js"></script> 
<script src="${jypath}/static/js/customer/distribution/list.js?v=${jsVersion}"></script>
</head>
<body>
	<div class="page-content">
		<ul class="nav nav-tabs">
			<li  class="active" onclick="setProcessStatus('0')">
				<a  data-toggle="tab">待分配</a>
			</li>
			<li onclick="setProcessStatus('1')">
				<a  data-toggle="tab">已分配</a>
			</li>
		</ul>
		<div class="col-xs-12 panel panel-default">
			<form id="baseForm" class="form-horizontal">
				<input type='hidden' class='pageNum' name='pageNum' value='1' /> 
				<input type='hidden' class='pageSize' name='pageSize' value='10' />
				<input type='hidden' name='processStatus' id='processStatus' value='0' />	
				<!-- 已分配 -->
				<div id="yifenpei" style="display:none">
					<div class="col-xs-6">
						<div class="form-horizontal">
							<div class="form-group">
								<label class="col-xs-2 control-label"><font style="color:red">*</font>项目名称:</label>
								<div class="col-xs-8">
									<select class="form-control" name="projectId" id="projectId" onchange="initAllUser()">
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-xs-2 control-label">分配人:</label>
								<div class="col-xs-8">
									<select class="form-control" name="createUserId" id="createUserId">
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-xs-2 control-label">客户等级:</label>
								<div class="col-xs-8">
									<div class="checkbox">
									   <c:forEach items="${intentionLevelList}" var="item">
									   <label><input type="checkbox" name="intentionLevel" value="${item.no}">${item.des}</label>
									   </c:forEach>
									</div>
								</div>
							</div>
	
							<div class="form-group">
								<label class="col-xs-2 control-label">客户状态:</label>
								<div class="col-xs-8">
									<div class="checkbox">
									 <c:forEach items="${customerStatusList}" var="item">
									   <label><input type="checkbox" name="customerStatus" value="${item.no}">${item.des}</label>
									   </c:forEach>
		
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-horizontal">
							<div class="form-group">
								<label class="col-xs-2 control-label">新归属人:</label>
								<div class="col-xs-8">
									<select class="form-control" name="assignPerson" id="assignPerson">
									</select>
								</div>
							</div>
	
							<div class="form-group">
								<label class="col-xs-2 control-label">分配日期:</label>
								<div class="col-xs-2">
									<input name="startTimeStart" type="text" class="form-control"
										readonly="readonly" onClick="WdatePicker()">
								</div>
								<div class="col-xs-2">
									<input name="startTimeEnd" type="text" class="form-control"
										readonly="readonly" onClick="WdatePicker()">
								</div>
							</div>
	
							<div class="form-group">
								<label class="col-xs-2 control-label">客户来源:</label>
								<div class="col-xs-8">
									<div class="checkbox">
									   <c:forEach items="${customerOriginList}" var="item">
									      <label><input type="checkbox" name="customerOrigin" value="${item.no}">${item.des}</label>
									   </c:forEach> 
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-xs-3 control-label"></label>
								<div class="col-xs-9">
									<button id='searchBtn' class="btn btn-warning  btn-xs"
										title="查询" type="button" onclick="getbaseList(1)">
										<i class="icon-search bigger-110 icon-only">查询</i>
									</button>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- 未分配 -->
				<div id="wfp">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="col-xs-2 control-label"><font style="color:red">*</font>项目名称:</label>
							<div class="col-xs-8">
								<select class="form-control" name="wfpProjectId" id="wfpProjectId">
								</select>
							</div>
						</div>
					</div>
					<div class="col-xs-2">
						<div class="form-group">
							<div>
								<button id='searchBtn' class="btn btn-warning  btn-xs"  style="width:70px;"
									title="查询" type="button" onclick="getwfpList(1)">
									<i class="icon-search bigger-110 icon-only">查询</i>
								</button>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
		<!-- 已分配 -->
		<div id="yifenpeiList" style="display:none" class="col-xs-12">
			<table id="baseTable"
				class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th class="center">序号</th>
						<th class="center">客户姓名</th>
						<th class="center">联系电话</th>
						<th class="center">性别</th>
						<th class="center">意向等级</th>
						<th class="center">客户状态</th>
						<th class="center">处理状态</th>
						<th class="center">处理结果</th>
						<th class="center">处理时间</th>
						<th class="center">新归属人</th>
						<th class="center">分配人</th>
						<th class="center">分配时间</th>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
			<div class="row">
				<div class="col-sm-8">
					<!--设置分页位置-->
					<div id="pageing" class="dataTables_paginate paging_bootstrap">
						<ul class="pagination"></ul>
					</div>
				</div>
			</div>
		</div>
		<!-- 未分配 -->
		<div id="wfpList" class="col-xs-12">
			<button type="button" onclick="openModelList()" class="btn btn-default">批量分配</button>
			<table id="wfpTable"
				class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th style="width:3%" class="center">
							<label><input type="checkbox" class="ace" ><span class="lbl"></span></label>
						</th>
						<th class="center">序号</th>
						<th class="center">客户姓名</th>
						<th class="center">联系电话</th>
						<th class="center">获知途径</th>
						<th class="center">最后跟进内容</th>
						<th class="center">最后跟进时间</th>
						<th class="center">创建人</th>
						<th class="center">创建时间</th>
						<th class="center">操作</th>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
			<div class="row">
				<div class="col-sm-8">
					<!--设置分页位置-->
					<div id="wfpPageing" class="dataTables_paginate paging_bootstrap">
						<ul class="pagination"></ul>
					</div>
				</div>
			</div>
		</div>
		<!-- #dialog-confirm -->
		<%@include file="../../common/dialog.jsp"%>
	</div>
	<!-- 模态框（Modal） -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	    <div class="modal-dialog">
	        <div class="modal-content" style="width:400px">
	            <div class="modal-header">
	                <h4 class="modal-title" id="myModalLabel">分配</h4>
	            </div>
	            <div class="modal-body">
	            	<div class="form-group" style="margin-top:20px">
						<label class="control-label" style="width:110px;padding-left:30px">销售组名称:</label>
						<select style="width:200px" name="xszId" id="xszId" onchange="jjList()">
						</select>
				     </div>
				     <div class="form-group" style="margin-top:10px">
						<label class="control-label" style="width:110px;padding-left:60px">经纪人:</label>
						<select style="width:200px" name="jjId" id="jjId">
						</select>
				     </div>
				     <div class="form-group" style="margin-top:10px;text-align:center;">
				     	<button type="button" onclick="fenPei()" class="btn btn-success">保存</button>
						<button type="button" class="btn btn-success" data-dismiss="modal" style="margin-left:30px">取消</button>
				     </div>
	            </div>
	        </div>
	    </div>
	</div>
	<input type="hidden" name="fenPeiId" id="fenPeiId"/> 
</body>
</html>